import React, { Component } from 'react'
import { HashRouter, NavLink } from 'react-router-dom'
import RouterView from '../router/router'
import rules from '../router/rules'
export default class Layout extends Component {
    render() {
        return (
            <HashRouter>
                <RouterView routes={rules}></RouterView>
                {/* <!-- 底部导航 --> */}
                <div className="tabbar" >
                    <NavLink className="icon icon-home" to='/home'activeClassName='router-link-active'>
                        商城
                    </NavLink>
                    <NavLink className="icon icon-cate" to='/cate'activeClassName='router-link-active'>
                        分类
                    </NavLink>
                    <NavLink className="icon icon-cart" to='/cart'activeClassName='router-link-active'>
                        <span className="badge">5</span>
                        购物车
                    </NavLink>
                    <NavLink className="icon icon-user" to='/uncenter'activeClassName='router-link-active'>
                        我的
                    </NavLink>
                </div>
            </HashRouter>
        )
    }
}
